/**
 * @Author MrsGuo
 * version 1.0
 * @Date 2023-08-15 11:20
 */
package com.cl.erp_2301.Service.impl;

import com.cl.erp_2301.Service.CheckReturnService;
import com.cl.erp_2301.Service.ReturnOrdersService;
import com.cl.erp_2301.dto.ReturnDTO;

import com.cl.erp_2301.dto.StoreOperDTO;
import com.cl.erp_2301.mapper.CheckReturnMapper;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;
import java.util.List;
@Transactional(rollbackFor = {Exception.class,RuntimeException.class})
@Service
public class CheckReturnServiceImpl implements CheckReturnService {
    @Resource
    private CheckReturnMapper checkReturnMapper;


    @Override
    public void checkReturn(ReturnDTO returnOrders) {
        checkReturnMapper.checkReturn(returnOrders);
        checkReturnMapper.insertReturnEnder(returnOrders);
    }



    @Override
    public void updateState(Integer id) {
        checkReturnMapper.updateState(id);
    }

    @Override
    public StoreOperDTO selectStoreOper(Integer id) {
        return checkReturnMapper.selectStoreOper(id);
    }

    @Override
    public void insertStoreOper(StoreOperDTO storeOpDTO) {
        checkReturnMapper.insertStoreOper(storeOpDTO);
    }

    @Override
    public Integer selectStoreNum(Integer goodsuuid) {
        return checkReturnMapper.selectStoreNum(goodsuuid);
    }

    @Override
    public void updateNum(StoreOperDTO storeDetailDTO) {
        checkReturnMapper.updateNum(storeDetailDTO);
    }
}
